package com.market.goods.dao.mongo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 商品评论
 */

@ToString
@Data
@Document(collection="marketGoodsComment")
public class MarketGoodsComment {

    @Id
    private String id;

    /**
     * 商品评论id
     */
    private String marketGoodsCommentId;

    /**
     * 商品id
     */
    private String goodsId;

    /**
     *级别:1 差评，2 中评，3 好评
     */
    private int grade;

    /**
     * 打分
     */
    private int scoring;

    private String commentContent;


    private Integer version;

    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    private Date createdTime;
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    private Date updateTime;

}
